package cc.aileron.wsgi.activity.registry;

import cc.aileron.wsgi.WsgiHttpCategory;
import cc.aileron.wsgi.activity.WsgiProcess;
import cc.aileron.wsgi.activity.WsgiValidator;
import cc.aileron.wsgi.container.WsgiContainer;

/**
 * @author Aileron
 * 
 * @param <Resource>
 */
public interface WsgiControllerCreator<Resource>
{
    /**
     * category
     * 
     * @param category
     * @return this
     */
    WsgiControllerCreator<Resource> category(WsgiHttpCategory category);

    /**
     * @param exception
     * @param process
     * @return this
     */
    WsgiControllerCreator<Resource> exception(Class<Exception> exception,
            WsgiProcess<Resource> process);

    /**
     * extension
     * 
     * @param extension
     * @return this
     */
    WsgiControllerCreator<Resource> extension(String extension);

    /**
     * isThrough
     * 
     * @param isThrough
     * @return this
     */
    WsgiControllerCreator<Resource> isThrough(boolean isThrough);

    /**
     * overrideKeys
     * 
     * @param overrideKey
     * @return this
     */
    WsgiControllerCreator<Resource> overrideKey(String overrideKey);

    /**
     * @param process
     * @return this
     */
    WsgiControllerCreator<Resource> process(Class<? extends WsgiProcess<? super Resource>> process);

    /**
     * @param validator
     * @param process
     * @return this
     */
    WsgiControllerCreator<Resource> process(Class<? extends WsgiValidator<? super Resource>> validator,
            Class<? extends WsgiProcess<? super Resource>> process);

    /**
     * @param validator
     * @param process
     * @return this
     */
    WsgiControllerCreator<Resource> process(Class<? extends WsgiValidator<? super Resource>> validator,
            WsgiProcess<? super Resource> process);

    /**
     * @param validator
     * @param transition
     * @param value
     * @return this
     */
    WsgiControllerCreator<Resource> process(Class<? extends WsgiValidator<? super Resource>> validator,
            WsgiTransitionCategory transition,
            String... value);

    /**
     * @param process
     * @return this
     */
    WsgiControllerCreator<Resource> process(WsgiProcess<? super Resource> process);

    /**
     * @param transition
     * @param value
     * @return this
     */
    WsgiControllerCreator<Resource> process(WsgiTransitionCategory transition,
            String... value);

    /**
     * @param validator
     * @param process
     * @return this
     */
    WsgiControllerCreator<Resource> process(WsgiValidator<? super Resource> validator,
            Class<? extends WsgiProcess<? super Resource>> process);

    /**
     * @param validator
     * @param process
     * @return this
     */
    WsgiControllerCreator<Resource> process(WsgiValidator<? super Resource> validator,
            WsgiProcess<? super Resource> process);

    /**
     * @param validator
     * @param transition
     * @param value
     * @return this
     */
    WsgiControllerCreator<Resource> process(WsgiValidator<? super Resource> validator,
            WsgiTransitionCategory transition,
            String... value);

    /**
     * @param container
     * @param accessorProvider
     */
    void registry(WsgiContainer container);

    /**
     * @param keys
     * @return this
     */
    WsgiControllerCreator<Resource> requestParameterKeys(String... keys);

    /**
     * uri
     * 
     * @param uri
     * @return this
     */
    WsgiControllerCreator<Resource> uri(final String uri);

}